<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow-IPC: util/util.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow-IPC<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow-IPC project: Public API.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_a762a7cb84c76c9561dbc78c61068184.html">util</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle"><div class="title">util.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceipc"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceipc.html">ipc</a></td></tr>
<tr class="memdesc:namespaceipc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Catch-all namespace for the Flow-IPC project: A library/API in modern C++17 providing high-performance communication between processes. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespaceipc_1_1util"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceipc_1_1util.html">ipc::util</a></td></tr>
<tr class="memdesc:namespaceipc_1_1util"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flow-IPC module containing miscellaneous general-use facilities that ubiquitously used by ~all Flow-IPC modules and/or do not fit into any other Flow-IPC module. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:abda2ce5bcdbc26ca63d667b87818439c"><td class="memItemLeft" align="right" valign="top">Permissions&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceipc_1_1util.html#abda2ce5bcdbc26ca63d667b87818439c">ipc::util::shared_resource_permissions</a> (Permissions_level permissions_lvl)</td></tr>
<tr class="memdesc:abda2ce5bcdbc26ca63d667b87818439c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maps general Permissions_level specifier to low-level <a class="el" href="namespaceipc_1_1util.html#a1b398ae730d1e6040687cb2397115152" title="Short-hand for Unix (POSIX) permissions class.">Permissions</a> value, when the underlying resource is in the file-system and is either accessible (read-write in terms of file system) or inaccessible.  <a href="namespaceipc_1_1util.html#abda2ce5bcdbc26ca63d667b87818439c">More...</a><br /></td></tr>
<tr class="separator:abda2ce5bcdbc26ca63d667b87818439c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbba79fcaee378f433e7ce3093e5c435"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceipc_1_1util.html#abbba79fcaee378f433e7ce3093e5c435">ipc::util::set_resource_permissions</a> (flow::log::Logger *logger_ptr, const fs::path &amp;path, const Permissions &amp;perms, Error_code *err_code=0)</td></tr>
<tr class="memdesc:abbba79fcaee378f433e7ce3093e5c435"><td class="mdescLeft">&#160;</td><td class="mdescRight">Utility that sets the permissions of the given resource (at the supplied file system path) to specified POSIX value.  <a href="namespaceipc_1_1util.html#abbba79fcaee378f433e7ce3093e5c435">More...</a><br /></td></tr>
<tr class="separator:abbba79fcaee378f433e7ce3093e5c435"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8b2f5a0cd9fe9db4511c9a3e685b6ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceipc_1_1util.html#af8b2f5a0cd9fe9db4511c9a3e685b6ae">ipc::util::set_resource_permissions</a> (flow::log::Logger *logger_ptr, Native_handle handle, const Permissions &amp;perms, Error_code *err_code=0)</td></tr>
<tr class="memdesc:af8b2f5a0cd9fe9db4511c9a3e685b6ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Identical to the other <a class="el" href="namespaceipc_1_1util.html#abbba79fcaee378f433e7ce3093e5c435" title="Utility that sets the permissions of the given resource (at the supplied file system path) to specifi...">set_resource_permissions()</a> overload but operates on a pre-opened <a class="el" href="structipc_1_1util_1_1Native__handle.html" title="A monolayer-thin wrapper around a native handle, a/k/a descriptor a/k/a FD.">Native_handle</a> (a/k/a handle, socket, file descriptor) to the resource in question.  <a href="namespaceipc_1_1util.html#af8b2f5a0cd9fe9db4511c9a3e685b6ae">More...</a><br /></td></tr>
<tr class="separator:af8b2f5a0cd9fe9db4511c9a3e685b6ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a924cd56daf7eeaa0b07edb352367f9ec"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceipc_1_1util.html#a924cd56daf7eeaa0b07edb352367f9ec">ipc::util::process_running</a> (process_id_t process_id)</td></tr>
<tr class="memdesc:a924cd56daf7eeaa0b07edb352367f9ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <code>true</code> if and only if the given process (by PID) is reported as running by the OS.  <a href="namespaceipc_1_1util.html#a924cd56daf7eeaa0b07edb352367f9ec">More...</a><br /></td></tr>
<tr class="separator:a924cd56daf7eeaa0b07edb352367f9ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bb38cee29dacbe56de5182221b45941"><td class="memItemLeft" align="right" valign="top">const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceipc_1_1util.html#a2bb38cee29dacbe56de5182221b45941">ipc::util::blob_data</a> (const Blob_const &amp;blob)</td></tr>
<tr class="memdesc:a2bb38cee29dacbe56de5182221b45941"><td class="mdescLeft">&#160;</td><td class="mdescRight">Syntactic-sugary helper that returns pointer to first byte in an immutable buffer, as <code>const uint8_t*</code>.  <a href="namespaceipc_1_1util.html#a2bb38cee29dacbe56de5182221b45941">More...</a><br /></td></tr>
<tr class="separator:a2bb38cee29dacbe56de5182221b45941"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af38a66554a822a470667967c56083e3b"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceipc_1_1util.html#af38a66554a822a470667967c56083e3b">ipc::util::blob_data</a> (const Blob_mutable &amp;blob)</td></tr>
<tr class="memdesc:af38a66554a822a470667967c56083e3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Syntactic-sugary helper that returns pointer to first byte in a mutable buffer, as <code>uint8_t*</code>.  <a href="namespaceipc_1_1util.html#af38a66554a822a470667967c56083e3b">More...</a><br /></td></tr>
<tr class="separator:af38a66554a822a470667967c56083e3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a5664539b3d75d6d10cdfebf6eac5382d"><td class="memItemLeft" align="right" valign="top"><a id="a5664539b3d75d6d10cdfebf6eac5382d" name="a5664539b3d75d6d10cdfebf6eac5382d"></a>
const Open_or_create&#160;</td><td class="memItemRight" valign="bottom"><b>ipc::util::OPEN_OR_CREATE</b></td></tr>
<tr class="memdesc:a5664539b3d75d6d10cdfebf6eac5382d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tag value indicating an open-if-exists-else-create operation. <br /></td></tr>
<tr class="separator:a5664539b3d75d6d10cdfebf6eac5382d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a3a6ec85242d073df96978c63464078"><td class="memItemLeft" align="right" valign="top"><a id="a6a3a6ec85242d073df96978c63464078" name="a6a3a6ec85242d073df96978c63464078"></a>
const Open_only&#160;</td><td class="memItemRight" valign="bottom"><b>ipc::util::OPEN_ONLY</b></td></tr>
<tr class="memdesc:a6a3a6ec85242d073df96978c63464078"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tag value indicating an atomic open-if-exists-else-fail operation. <br /></td></tr>
<tr class="separator:a6a3a6ec85242d073df96978c63464078"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1ca1cab79a35e1eb1c47037a0973cd8"><td class="memItemLeft" align="right" valign="top"><a id="ad1ca1cab79a35e1eb1c47037a0973cd8" name="ad1ca1cab79a35e1eb1c47037a0973cd8"></a>
const Create_only&#160;</td><td class="memItemRight" valign="bottom"><b>ipc::util::CREATE_ONLY</b></td></tr>
<tr class="memdesc:ad1ca1cab79a35e1eb1c47037a0973cd8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tag value indicating an atomic create-unless-exists-else-fail operation. <br /></td></tr>
<tr class="separator:ad1ca1cab79a35e1eb1c47037a0973cd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca6ca223759ca3e11d5834a323454afa"><td class="memItemLeft" align="right" valign="top"><a id="aca6ca223759ca3e11d5834a323454afa" name="aca6ca223759ca3e11d5834a323454afa"></a>
const std::string&#160;</td><td class="memItemRight" valign="bottom"><b>ipc::util::EMPTY_STRING</b></td></tr>
<tr class="memdesc:aca6ca223759ca3e11d5834a323454afa"><td class="mdescLeft">&#160;</td><td class="mdescRight">A (default-cted) string. May be useful for functions returning <code>const std::string&amp;</code>. <br /></td></tr>
<tr class="separator:aca6ca223759ca3e11d5834a323454afa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 11 2025 20:02:23 for Flow-IPC by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
